package com.xiaohudie.SGGio;

import lombok.SneakyThrows;

import java.io.RandomAccessFile;
import java.nio.charset.StandardCharsets;

/**
 * @Author xiao hu die
 * @Date 2022/3/27 2:09
 * @Version 1.0
 */
public class RandomAccessTest {
    @SneakyThrows
    public static void main(String[] args) {
        RandomAccessFile randomAccessFile = new RandomAccessFile("D:\\java图片代码\\22.txt","rw");
        randomAccessFile.seek(3);
        randomAccessFile.write("aaaaa".getBytes(StandardCharsets.UTF_8));
        randomAccessFile.close();
    }
}
